home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
009a
/
snpd0493.zip
/
SHEL2DOS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-05
|
473b
|
24 lines
.I 9 1
#include <stdio.h>
.I 11 1
#include <process.h>
.I 14 2
char *comspec, prompt[256], *oldprompt;
int retval;
.D 15 1
.I 21 1
oldprompt = getenv("PROMPT"));
.D 22 2
.I 25 6
retval = spawnlp(0, comspec, NULL, "/p", NULL);
sprintf(prompt, "PROMPT=%s", oldprompt);
putenv(prompt);
return retval;
.D 26 1
.I 37 3
retval = shell_to_DOS();
printf("shell_to_DOS() returned %d\n", retval);